// @author A0105514U

package gCalEngine;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import org.junit.Before;
import org.junit.Test;

public class GoogleSyncRecordTestDriver {
//	private Map<String,Boolean> record = new HashMap<String, Boolean>();
	GoogleSyncRecord record;
	
	@Before
	public void setUp(){
		ArrayList<String> fileNameList = new ArrayList<String>();
		fileNameList.add("Mike");
		fileNameList.add("John");
		fileNameList.add("Jason");
		fileNameList.add("Mary");
		fileNameList.add("Gillbert");
		
		record = new GoogleSyncRecord(fileNameList);
	}
	
	@Test
	public void test1(){
//		assertTrue(!record.getRecord("Mike"));
		assertFalse(record.getRecord("Mary"));
	}
	
	@Test
	public void test2(){
		record.setSync("Mary");
		assertTrue(record.getRecord("Mary"));
	}
	
	@Test
	public void test3(){
		assertFalse(record.getRecord("Jow"));
	}
	
	// Testing for when key is null
	@Test
	public void test4(){
		assertFalse(record.getRecord(null));
	}
	
	// Testing the case when key is empty string
	@Test
	public void test5(){
		assertFalse(record.getRecord(""));
	}
}
